﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_RETURN_ORDER
// * CreateDate    : 2013/1/16 15:38:17
// * Creater       : SalesReturnOrderEntity
// * LastChangeDate: 2013/1/16 15:38:17
// * LastChanger   : 2013/1/16 15:38:17
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class SalesReturnOrderEntity : EntityBase
    {
        public SalesReturnOrderTable TableSchema
        {
            get
            {
                return SalesReturnOrderTable.Current;
            }
        }

        public SalesReturnOrderEntity()
        {

        }

        public SalesReturnOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.Created = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.Modified = Convert.ToDateTime(CommonFunctions.ToObject(dr["MODIFIED"]));
            this.ModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["MODIFIED_BY"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.ApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_CODE"]));
            this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Approved = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
        }

        public SalesReturnOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
            this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
            this.Created = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.Modified = Convert.ToDateTime(CommonFunctions.ToObject(dr["MODIFIED"]));
            this.ModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["MODIFIED_BY"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.ApplicationCode = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_CODE"]));
            this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Approved = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesReturnOrderTable.Current;
            }
        }

        #region Perporty List
        public string Id
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_ID)); }
            set { SetData(SalesReturnOrderTable.C_ID, value); }
        }

        public string ApplicationId
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_APPLICATION_ID)); }
            set { SetData(SalesReturnOrderTable.C_APPLICATION_ID, value); }
        }

        public DateTime Created
        {
            get { return Convert.ToDateTime(GetData(SalesReturnOrderTable.C_CREATED)); }
            set { SetData(SalesReturnOrderTable.C_CREATED, value); }
        }

        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_CREATED_BY)); }
            set { SetData(SalesReturnOrderTable.C_CREATED_BY, value); }
        }

        public DateTime Modified
        {
            get { return Convert.ToDateTime(GetData(SalesReturnOrderTable.C_MODIFIED)); }
            set { SetData(SalesReturnOrderTable.C_MODIFIED, value); }
        }

        public string ModifiedBy
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_MODIFIED_BY)); }
            set { SetData(SalesReturnOrderTable.C_MODIFIED_BY, value); }
        }

        public string OrderCode
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_ORDER_CODE)); }
            set { SetData(SalesReturnOrderTable.C_ORDER_CODE, value); }
        }

        public string ApplicationCode
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_APPLICATION_CODE)); }
            set { SetData(SalesReturnOrderTable.C_APPLICATION_CODE, value); }
        }

        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_CUSTOMER_ID)); }
            set { SetData(SalesReturnOrderTable.C_CUSTOMER_ID, value); }
        }

        public string Description
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_DESCRIPTION)); }
            set { SetData(SalesReturnOrderTable.C_DESCRIPTION, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_REMARK)); }
            set { SetData(SalesReturnOrderTable.C_REMARK, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_APPROVED_BY)); }
            set { SetData(SalesReturnOrderTable.C_APPROVED_BY, value); }
        }

        public DateTime Approved
        {
            get { return Convert.ToDateTime(GetData(SalesReturnOrderTable.C_APPROVED)); }
            set { SetData(SalesReturnOrderTable.C_APPROVED, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(SalesReturnOrderTable.C_STATUS)); }
            set { SetData(SalesReturnOrderTable.C_STATUS, value); }
        }

        public DateTime OrderDate
        {
            get { return Convert.ToDateTime(GetData(SalesReturnOrderTable.C_ORDER_DATE)); }
            set { SetData(SalesReturnOrderTable.C_ORDER_DATE, value); }
        }

        #endregion
    }


}

